package com.youxue.teachin.set.child.xuekexueduan;

import com.library.uiframework.activity.WrapActionBarFragmentActivity;
import com.library.uiframework.widget.actionbar.ActionBarLayout.Action;
import com.youxue.teachin.R;

/**
 * 在此写用途
 *
 * @author: zhiwei
 * @date: 2017-10-07 16:28
 * @version: 9.1.0
 */
public class XuekeXueduanActivity extends WrapActionBarFragmentActivity<XueKeXueDuanFragment>{
    @Override
    protected Class wrapFragmentClass() {

        return XueKeXueDuanFragment.class;
    }

    @Override
    protected void onInitActionBar() {
        super.onInitActionBar();
        setTitle("学科学段设置");
        int color = getResources().getColor(R.color.set_actionbar_color);
        getActionBarLayout().setActionBarBackground(color);
        int titleColor = getResources().getColor(R.color.cl_1);
        setStatusBarColor(color);
        getActionBarLayout().setTitleColor(titleColor);

        Action action = addTextAction(100, "完成");
        action.setTextColor(titleColor);
    }

    @Override
    protected void onActionClick(int actionId, Action action) {
        super.onActionClick(actionId, action);
        getWrapFragment().comment();
    }

    @Override
    protected Action createBack() {
        return addLeftImageAction(ACTION_BACK, R.drawable.top_return);
    }
}
